473,418 Members | 4,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Problem with IE6 & xhtml-strict <div> menu handling

I've successfully setup a xhtml 1.0 strict page with Mozilla & Netscape
to display links in a toolbar into an internal <div id='content'> within
the same document. The toolbar uses some javascript, but mostly CSS
class & id elements.

Mozilla & Netscape work fine handling the toolbar submenus & contents,
but IE6 misbehaves on several areas.

On loading the page, the target div (id='content') will not display.
When a menu item is selected from the toolbar popup menus, the first
selection displays in the content div, but the z-indexing doesn't work.

A picture's worth a 1,000 words, so if you have experience with this,
check out http://idzgw2.homeunix.org/idz.html. the page validates as
XHTML 1.0 strict compliant, but the page doesn't work properly under IE.

Thanks in advance for any info on this.

Jul 20 '05 #1
2 5742


Brian Idzik wrote:
I've successfully setup a xhtml 1.0 strict page with Mozilla & Netscape
to display links in a toolbar into an internal <div id='content'> within
the same document. The toolbar uses some javascript, but mostly CSS
class & id elements.

Mozilla & Netscape work fine handling the toolbar submenus & contents,
but IE6 misbehaves on several areas.

On loading the page, the target div (id='content') will not display.
When a menu item is selected from the toolbar popup menus, the first
selection displays in the content div, but the z-indexing doesn't work.

A picture's worth a 1,000 words, so if you have experience with this,
check out http://idzgw2.homeunix.org/idz.html. the page validates as
XHTML 1.0 strict compliant, but the page doesn't work properly under IE.


Well, IE doesn't even support XHTML so throwing XHTML at it doesn't
increase your chances that the page "works properly".
And a valid XHTML page doesn't mean that the browser can handle your
misguided attempts of building a page that relies on JavaScript to work.

For instance you have links alike

<a class="menuItem"
title="Seti@home"
href="javascript:loadPage('http://setiathome.ssl.berkeley.edu/index.html');">
Seti@home</a>

meaning the whole menu depends on JavaScript to be enabled. And loadPage
looks as follows

function loadPage (url) {
if (browser.isNS) {
document.getElementById('content').innerHTML='<obj ect id="url"
style="width:642px;height:370px;z-index:10;" data="' + url + '"
type="text/html">A DOM Compliant browser is required to view this
document</object>';
} else if (browser.isIE) {
document.all['content'].innerHTML='<object id="url"
type="text/x-scriptlet"
style="width:642px;height:370px;overflow:auto;z-index:10;" data="' + url
+ '">A DOM/W3C compliant browser is needed to open this page.</object>';
} else {
alert("Please have your computer support staff upgrade your
browser");
}

}

so obviously you don't have any interest in browsers that implement
XHTML 1.0 but only in browsers that your scripts sniffer recognizes as
NS or IE.

If you want to have a link to load the referenced URL into an element in
your page then use the HTML <iframe> element and a HTML link targetting
the iframe:
<a href="http://setiathome.ssl.berkeley.edu/index.html"
target="contentFrame">Seti@home</a>

<iframe name="contentFrame" width="200" height="200"></iframe>
No need to throw JavaScript at the browser or even any "Please have your
computer support staff upgrade your browser" messages.
Admittedly <iframe> is not part of XHTML 1.0 strict but it is at least
supported by browsers without all the flaws and shortcomings of the
<object> element implementation in current browsers.
And with many browsers iframes (or objects) are implemented as so called
windowed controls meaning they are always on top of other elements even
if CSS z-index is applied but that is a known issue and if you want your
page to be rendered by as much user agents as possible you would better
not rely on a JavaScript menu to be able to lie on top of <iframe> (or
<object>) elements.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
On Thu, 11 Dec 2003 18:49:39 -0900, Brian Idzik <bj*****@gci.net> wrote:
I've successfully setup a xhtml 1.0 strict page with Mozilla & Netscape
to display links in a toolbar into an internal <div id='content'> within
the same document. The toolbar uses some javascript, but mostly CSS
class & id elements.

Mozilla & Netscape work fine handling the toolbar submenus & contents,
but IE6 misbehaves on several areas.

On loading the page, the target div (id='content') will not display.
When a menu item is selected from the toolbar popup menus, the first
selection displays in the content div, but the z-indexing doesn't work.

A picture's worth a 1,000 words, so if you have experience with this,
check out http://idzgw2.homeunix.org/idz.html. the page validates as
XHTML 1.0 strict compliant, but the page doesn't work properly under IE.

Thanks in advance for any info on this.


Get rid of the XML prolog maybe...
--
Best regards,
Mark
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Mark Constant | last post by:
Like I have said in a couple of different questions I have a DIV menu. Now I am almost complete with my site and I am testing it on different browsers. My problem is that when I look at the Div...
0
by: vikram.cvk | last post by:
Hello Experts, Im trying to design a CSS vertical drop down menu which should have the following functionality. Home About Us | -->Overview
3
DIV
by: Winston | last post by:
Hello, I am not sure if I need Javascript for this: I have a page with one DIV on the left (menu), and other on the right, with the content. I want just one page for the menu code, but that...
3
by: benn600 | last post by:
I'm in the process of taking an old table laden, poor code design web site and updating it to a modern day, mostly standards compliant design with only CSS where possible. I'm not having trouble...
2
by: gia999 | last post by:
Hi there, I am trying to get a menu (a div which will contain a list of links) to pop up when you rollover a link and this pop ups just beneath the link which calls it. I have it working in IE...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
3
by: MZ | last post by:
Hello! I would like to make my div text vertical-aligned:middle, but I cannot do this. I want to have divs float to left: <div style="width:800pt;background-color:#909ED5;"> <div...
2
by: samz | last post by:
Hello, 1. How to get my DIV (DIV.Box) fit its content (an image)? width:auto doesn't work? 2. How to get links (A) in this DIV click-able (on the IMG) in IE6 too? Thanks URL:...
1
by: dorayme | last post by:
In article <gfq3no$r1d$1@oxygen.pond.sub.org>, hu47121+nospam@usenet.kitty.sub.org (Hannah) wrote: Surely you don't really want this to look like this in FF or any browser: ...
1
omerbutt
by: omerbutt | last post by:
hi every one i have a menu li and ul based the problem is when any specific category in the li is hovered the li or the sub-cat items appear but as i move my mouse over the sub-cat or level two li it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.